﻿using My.SequentialId.SequentialId.Internal;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace My.SequentialId.SequentialId
{
    public class SequentialIdProviderFactory
    {
        private static readonly ISequentialId<long> SequentialNumId = new SequentialNumId();
        private static readonly ISequentialId<Guid> SequentialGuid = new SequentialGuid();

        public static ISequentialId<T> GetProvider<T>()
        {
            if (typeof(T) == typeof(long))
                return (ISequentialId<T>)SequentialNumId;

            if (typeof(T) == typeof(Guid))
                return (ISequentialId<T>)SequentialGuid;

            throw new NotImplementedException("UnSupported Type");
        }
    }
}
